package org.gdtc.storefront.service.impl;

import org.gdtc.storefront.entity.Bannerpicture;
import org.gdtc.storefront.mapper.BannerpictureMapper;
import org.gdtc.storefront.service.BannerpictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BannerpictureServiceImpl implements BannerpictureService {
    @Autowired
    private BannerpictureMapper bannerpictureMapper;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return bannerpictureMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Bannerpicture record) {
        return bannerpictureMapper.insert(record);
    }

    @Override
    public Bannerpicture selectByPrimaryKey(Integer id) {
        return bannerpictureMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Bannerpicture> selectAll(Integer storeid) {
        return bannerpictureMapper.selectAll(storeid);
    }

    @Override
    public int updateByPrimaryKey(Bannerpicture record) {
        return bannerpictureMapper.updateByPrimaryKey(record);
    }

    @Override
    public int InaBanner(@RequestBody Bannerpicture bannerpicture) {
        return bannerpictureMapper.InsBanner(bannerpicture);
    }

    @Override
    public int UpdState(Integer state, Integer id) {
        return bannerpictureMapper.UpdState(state, id);
    }

}
